home *** CD-ROM | disk | FTP | other *** search
/ Gold Medal Software 1 / Gold Medal Software Volume 1 (Gold Medal) (1994).iso / autocad / 101hatch.arj / WD_END.LSP < prev    next >
Text File  |  1993-10-13  |  950b  |  27 lines

  1. ;     by Bryan Wallace of CAD Studio, Austin, Texas
  2. ;
  3. ;   This routine automates the hatching of a 
  4. ;   parallelogram using the W3 (Wood End) hatch pattern. 
  5. ;
  6. (defun C:WD_END ()
  7.           (setvar "CMDECHO" 0)
  8.           (command "graphscr")
  9.           (setq PT1 (getpoint "\nFirst point... "))
  10.           (setq PT2 (getpoint "\nSecond point... "))
  11.           (setq PT3 (getpoint "\nThird point... \n"))
  12.           (setq D1 (/ (distance PT1 PT2) 6 ))
  13.           (setq ANG (* (angle PT1 PT2) (/ 180 PI )))
  14.           (setq SB (getvar "SNAPBASE"))
  15.           (setq SPB PT1)
  16.           (if ( = (length SPB) 3)
  17.               (setq SPB (list (car SPB) (cadr SPB) ))
  18.           ) 
  19.           (setvar "SNAPBASE" SPB)
  20.           (princ "Select boundary lines for the hatch area\n")
  21.           (setq ss (ssget))
  22.           (command "HATCH" "W3" D1 ANG "P" "")
  23.           (setvar "SNAPBASE" SB)
  24.           (setvar "CMDECHO" 1)
  25.           (princ)
  26. )  
  27.